<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>if条件语句返回true(不是我们预期的)因为条件语句执行为x赋值10 10为true</title>
</head>

<body>
    <p id="demo"></p>
    <script>
        var x = 0;
        document.getElementById("demo").innerHTML = Boolean(x = 10);
    </script>
</body>

</html>